home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / graphics / jpeg4a.zoo / usage < prev   
Text File  |  1993-03-20  |  17KB  |  346 lines

  1. USAGE instructions for the Independent JPEG Group's JPEG software
  2. =================================================================
  3.  
  4. INTRODUCTION
  5.  
  6. This distribution contains software to implement JPEG image compression and
  7. decompression.  JPEG (pronounced "jay-peg") is a standardized compression
  8. method for full-color and gray-scale images.  JPEG is designed to handle
  9. "real-world" scenes, for example scanned photographs.  Cartoons, line
  10. drawings, and other non-realistic images are not JPEG's strong suit; on this
  11. sort of material you may get poor image quality and/or little compression.
  12.  
  13. JPEG is lossy, meaning that the output image is not necessarily identical to
  14. the input image.  Hence you should not use JPEG if you have to have identical
  15. output bits.  However, on typical real-world images, very good compression
  16. levels can be obtained with no visible change, and amazingly high compression
  17. is possible if you can tolerate a low-quality image.  You can trade off image
  18. quality against file size by adjusting the compressor's "quality" setting.
  19.  
  20. NOTE: the switch syntax has been redesigned since the v3 release of
  21. cjpeg/djpeg.  Switch names are now words instead of single letters.
  22.  
  23.  
  24. ATARI USAGE
  25.  
  26. This software has been compiled with a dos-like userinterface that 
  27. supports using wildcards ('*' and '?'). I have changed the names
  28. so "cjpeg" is now called "gif2jpg"  and "djpeg" is named "jpg2gif".
  29. The wildcard expansion works fine for TOS filesystems, but will give
  30. poor results on minix or other MiNT filesystems. But don't worry, most
  31. of the usual MiNT shell do the wildcard expansion themselves and pass 
  32. a list of files to our programs.
  33. jpg2gif and gif2jpg use the standard "ARGV" argument passing scheme.
  34. You can also install them in desktop as standard applications for ".gif"
  35. and ".jpg" files if you like to.
  36. All these changes have been done by Frank Möhle, germany. (that's me!)
  37. My internet adress is : 
  38. Frank.Moehle@arbi.informatik.uni-oldenburg.DE
  39.  have fun !
  40. Now let's continue with the general usage ...
  41.  
  42. GENERAL USAGE
  43.  
  44. We provide two programs, cjpeg to compress an image file into JPEG format,
  45. and djpeg to decompress a JPEG file back into a conventional image format.
  46.  
  47. The basic command line is:
  48.     cjpeg [switches] list of image files
  49. or
  50.     djpeg [switches] list of jpeg files
  51.  
  52. Each file named is compressed or decompressed.  The input file(s) are not
  53. modified; the output data is written to files which have the same names except
  54. for extension.  cjpeg always uses ".jpg" for the output file name's extension;
  55. djpeg uses one of ".gif", ".ppm", ".rle", or ".tga", depending on what output
  56. format is selected by the switches.
  57.  
  58. For example, to convert xxx.gif to xxx.jpg and yyy.ppm to yyy.jpg, say:
  59.     cjpeg xxx.gif yyy.ppm
  60.  
  61. On most systems you can use standard wildcards to specify the list of input
  62. files; for example, on DOS "djpeg *.jpg" decompresses all the JPEG files in
  63. the current directory.
  64.  
  65. If an intended output file already exists, you'll be asked whether or not to
  66. overwrite it.  If you say no, the program skips that input file and goes on to
  67. the next one.
  68.  
  69. You can intermix switches and file names; for example
  70.     djpeg -gif file1.jpg -targa file2.jpg
  71. decompresses file1.jpg into GIF format (file1.gif) and file2.jpg into Targa
  72. format (file2.tga).  Only switches to the left of a given file name affect
  73. processing of that file; when there are conflicting switches, the rightmost
  74. one takes precedence.
  75.  
  76. The currently supported image file formats are: PPM (PBMPLUS color format),
  77. PGM (PBMPLUS gray-scale format), GIF, Targa, and RLE (Utah Raster Toolkit
  78. format).  (RLE is supported only if the URT library is available, which it
  79. isn't on most non-Unix systems.)  cjpeg recognizes the input image format
  80. automatically, with the exception of some Targa-format files.  You have to
  81. tell djpeg which output format to generate.
  82.  
  83. The only JPEG file format currently supported is the JFIF format.  Support for
  84. the TIFF 6.0 JPEG format will probably be added at some future date.
  85.  
  86. All switch names may be abbreviated; for example, -grayscale may be written
  87. -gray or -gr.  Most of the "basic" switches can be abbreviated to as little as
  88. one letter.  Upper and lower case are equivalent (-GIF is the same as -gif).
  89. British spellings are also accepted (e.g., -greyscale), though for brevity
  90. these are not mentioned below.
  91.  
  92. CJPEG DETAILS
  93.  
  94. The basic command line switches for cjpeg are:
  95.  
  96.     -quality N    Scale quantization tables to adjust image quality.
  97.             Quality is 0 (worst) to 100 (best); default is 75.
  98.             (See below for more info.)
  99.  
  100.     -grayscale    Create monochrome JPEG file from color input.
  101.             Be sure to use this switch when compressing a grayscale
  102.             GIF file, because cjpeg isn't bright enough to notice
  103.             whether a GIF file uses only shades of gray.  By
  104.             saying -grayscale, you'll get a smaller JPEG file that
  105.             takes less time to process.
  106.  
  107.     -optimize    Perform optimization of entropy encoding parameters.
  108.             Without this, default encoding parameters are used.
  109.             -optimize usually makes the JPEG file a little smaller,
  110.             but cjpeg runs somewhat slower and needs much more
  111.             memory.  Image quality and speed of decompression are
  112.             unaffected by -optimize.
  113.  
  114.     -targa        Input file is Targa format.  Targa files that contain
  115.             an "identification" field will not be automatically
  116.             recognized by cjpeg; for such files you must specify
  117.             -targa to make cjpeg treat the input as Targa format.
  118.  
  119. The -quality switch lets you trade off compressed file size against quality of
  120. the reconstructed image: the higher the quality setting, the larger the JPEG
  121. file, and the closer the output image will be to the original input.  Normally
  122. you want to use the lowest quality setting (smallest file) that decompresses
  123. into something visually indistinguishable from the original image.  For this
  124. purpose the quality setting should be between 50 and 95; the default of 75 is
  125. often about right.  If you see defects at -quality 75, then go up 5 or 10
  126. counts at a time until you are happy with the output image.  (The optimal
  127. setting will vary from one image to another.)
  128.  
  129. -quality 100 will generate a quantization table of all 1's, eliminating loss
  130. in the quantization step (but there is still information loss in subsampling,
  131. as well as roundoff error).  This setting is mainly of interest for
  132. experimental purposes.  Quality values above about 95 are NOT recommended for
  133. normal use; the compressed file size goes up dramatically for hardly any gain
  134. in output image quality.
  135.  
  136. In the other direction, quality values below 50 will produce very small files
  137. of low image quality.  Settings around 5 to 10 might be useful in preparing an
  138. index of a large image library, for example.  Try -quality 2 (or so) for some
  139. amusing Cubist effects.  (Note: quality values below about 25 generate 2-byte
  140. quantization tables, which are considered optional in the JPEG standard.
  141. cjpeg emits a warning message when you give such a quality value, because
  142. some commercial JPEG programs may be unable to decode the resulting file.)
  143.  
  144. Switches for advanced users:
  145.  
  146.     -maxmemory N    Set limit for amount of memory to use in processing
  147.             large images.  Value is in thousands of bytes, or
  148.             millions of bytes if "M" is attached to the number.
  149.             For example, -max 4m selects 4000000 bytes.  If more
  150.             space is needed, temporary files will be used.
  151.  
  152.     -restart N    Emit a JPEG restart marker every N MCU rows, or every
  153.             N MCU blocks if "B" is attached to the number.
  154.             -restart 0 (the default) means no restart markers.
  155.  
  156.     -smooth N    Smooth the input image to eliminate dithering noise.
  157.             N, ranging from 1 to 100, indicates the strength of
  158.             smoothing.  0 (the default) means no smoothing.
  159.  
  160.     -verbose    Enable debug printout.  More -v's give more printout.
  161.     or  -debug    Also, version information is printed at startup.
  162.  
  163. The -restart option inserts extra markers that allow a JPEG decoder to
  164. resynchronize after a transmission error.  Without restart markers, any damage
  165. to a compressed file will usually ruin the image from the point of the error
  166. t